<template>
  <div class="right-project-item-box">
    <div class="right-project-item" @click="redirectProjct">
      <div
        class="right-project-item-sign"
        :style="{ 'background-color': data.color }"
      ></div>
      <div class="right-project-item-top">
        <div>
          <div class="right-project-item-title">
            {{ data.title }}
          </div>
          <div class="right-project-item-time">
            {{ formatDate(data.startTime) }}～{{ formatDate(data.endTime) }}
          </div>
        </div>
        <div class="right-project-item-operate">
          <img
            src="https://image.xuexiwangzhe.com/FlWa7D-fND4V7P5EabuxvxbKkmmh"
            class="right-project-item-operate-img"
            @click.stop="shareModal = true"
          />
          <div
            class="right-project-item-menu-box"
            v-click-outside="closeProjectMenu"
          >
            <img
              src="https://image.xuexiwangzhe.com/FouYcpWD0njmKlGTrr7lLpWUdzdO"
              class="right-project-item-operate-img"
              @click.stop="projectMenu = !projectMenu"
            />
            <div class="right-project-item-menu-modal" v-if="projectMenu">
              <div v-if="navActived !== 'recycle'">
                <div class="right-project-item-menu-modal-item switch-color">
                  <div class="right-project-item-menu-modal-item-left">
                    <img
                      src="https://image.xuexiwangzhe.com/FgL1Mi3BYA6D2ZnVbrCoW84u5I2i"
                      class="right-project-item-menu-modal-item-left-img-actived"
                    />
                    <img
                      src="https://image.xuexiwangzhe.com/FjOCqCFm1jTqbWtJXDM0TfneJjtX"
                      class="right-project-item-menu-modal-item-left-img"
                    />
                    <div>修改主题色</div>
                  </div>
                  <img
                    src="https://image.xuexiwangzhe.com/FlPspKXYPYyP4rPiVoTfgtizauvI"
                    class="right-project-item-menu-modal-item-right-img"
                  />
                  <img
                    src="https://image.xuexiwangzhe.com/Fr_uD5OQu6RGAy8LV3UZ5-n-jGp4"
                    class="right-project-item-menu-modal-item-right-img-actived"
                  />

                  <div class="right-project-color-select-box">
                    <div class="right-project-color-select">
                      <div
                        class="right-project-color-select-option"
                        v-for="(item, index) in color"
                        :key="index"
                        :style="{ background: item }"
                        @click.stop="colorProject(index)"
                      >
                        <img
                          class="color-active"
                          v-if="item === data.color"
                          src="https://image.xuexiwangzhe.com/FtQTH8aa3NRrCGluvu_j5fvoIKVV"
                        />
                      </div>
                    </div>
                  </div>
                </div>
                <div class="right-project-item-menu-modal-item">
                  <div class="right-project-item-menu-modal-item-left">
                    <img
                      src="https://image.xuexiwangzhe.com/Fv1acxz_u39Rnt2YTNEM3UHZsVLX"
                      class="right-project-item-menu-modal-item-left-img"
                    />
                    <img
                      src="https://image.xuexiwangzhe.com/Fq0qU2pDNqDEdMHCkxxuO3JPfCC_"
                      class="right-project-item-menu-modal-item-left-img-actived"
                    />
                    <div>移动到</div>
                  </div>
                  <img
                    src="https://image.xuexiwangzhe.com/FlPspKXYPYyP4rPiVoTfgtizauvI"
                    class="right-project-item-menu-modal-item-right-img"
                  />
                  <img
                    src="https://image.xuexiwangzhe.com/Fr_uD5OQu6RGAy8LV3UZ5-n-jGp4"
                    class="right-project-item-menu-modal-item-right-img-actived"
                  />
                </div>
                <div
                  class="right-project-item-menu-modal-item"
                  @click.stop="editModal = true"
                >
                  <div class="right-project-item-menu-modal-item-left">
                    <img
                      src="https://image.xuexiwangzhe.com/Fk9yaeKty6nigT0kvliXM7_2o_-Q"
                      class="right-project-item-menu-modal-item-left-img"
                    />
                    <img
                      src="https://image.xuexiwangzhe.com/Fgzg9YhltSa7b8nnd0hjvWnJrDal"
                      class="right-project-item-menu-modal-item-left-img-actived"
                    />
                    <div>重命名</div>
                  </div>
                </div>
                <div
                  class="right-project-item-menu-modal-item"
                  @click.stop="copyProject"
                >
                  <div class="right-project-item-menu-modal-item-left">
                    <img
                      src="https://image.xuexiwangzhe.com/FjzUkxyG9dOEu8Vv2mqrhiKjds9G"
                      class="right-project-item-menu-modal-item-left-img"
                    />
                    <img
                      src="https://image.xuexiwangzhe.com/FqkF_4lOMQ8kMG_x7tpZGIMZ7AOh"
                      class="right-project-item-menu-modal-item-left-img-actived"
                    />
                    <div>复制</div>
                  </div>
                </div>
                <div
                  class="right-project-item-menu-modal-item"
                  @click.stop="deleteModal = true"
                >
                  <div class="right-project-item-menu-modal-item-left">
                    <img
                      src="https://image.xuexiwangzhe.com/Fp4i_Wbd9xaO35QI4THWrl34MtYl"
                      class="right-project-item-menu-modal-item-left-img"
                    />
                    <img
                      src="https://image.xuexiwangzhe.com/FpC9Dqj7VQZoiYAqe0cnOVoPPynJ"
                      class="right-project-item-menu-modal-item-left-img-actived"
                    />
                    <div>删除</div>
                  </div>
                </div>
                <div class="right-project-item-menu-modal-item">
                  <div class="right-project-item-menu-modal-item-left">
                    <img
                      src="https://image.xuexiwangzhe.com/FsGJUJeYTKKIQTEpSWo4lwXK0rAg"
                      class="right-project-item-menu-modal-item-left-img"
                    />
                    <img
                      src="https://image.xuexiwangzhe.com/Fl595ZHrzRBMkDbaHsI7WuVixu6i"
                      class="right-project-item-menu-modal-item-left-img-actived"
                    />
                    <div>批量管理</div>
                  </div>
                </div>
              </div>
              <div v-else>
                <div
                  class="right-project-item-menu-modal-item"
                  @click.stop="restore"
                >
                  <div class="right-project-item-menu-modal-item-left">
                    <img
                      src="http://image.xuexiwangzhe.com/Fj0PdcBgHLvi2PA_V53XHto-BSGT"
                      class="right-project-item-menu-modal-item-left-img"
                    />
                    <img
                      src="http://image.xuexiwangzhe.com/FqmTkVzVspqmwT_fmMlQTFjNiHW8"
                      class="right-project-item-menu-modal-item-left-img-actived"
                    />
                    <div>还原</div>
                  </div>
                </div>
                <div
                  class="right-project-item-menu-modal-item"
                  @click.stop="deleteLongModal = true"
                >
                  <div class="right-project-item-menu-modal-item-left">
                    <img
                      src="http://image.xuexiwangzhe.com/Fp4i_Wbd9xaO35QI4THWrl34MtYl"
                      class="right-project-item-menu-modal-item-left-img"
                    />
                    <img
                      src="https://image.xuexiwangzhe.com/FpC9Dqj7VQZoiYAqe0cnOVoPPynJ"
                      class="right-project-item-menu-modal-item-left-img-actived"
                    />
                    <div>永久删除</div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="right-project-item-bottom">
        <div class="right-project-item-bottom-left" v-if="navActived !== 'recycle'">
          <div class="right-project-item-tag">
            {{ data.type | projectType }}
          </div>
          <div class="right-project-item-count">
            <span class="right-project-item-count-number">{{
              data.themeNum
            }}</span>
            主题
          </div>
        </div>
        <div class="right-project-item-bottom" v-else>  
          还有 {{ data.deleteDayNum }} 天将永久删除
        </div>
        <img
          v-if="data.isStar == 0"
          @click.stop="setStar"
          src="https://image.xuexiwangzhe.com/FpWQHxiy3aLgFbgKBnpG-QiWRhPi"
          class="right-project-item-collect-img"
        />
        <img
          v-else
          @click.stop="setStar"
          src="https://image.xuexiwangzhe.com/FuP8G153P9tHqZXw5yXoV1aRtcS-"
          class="right-project-item-collect-img"
        />
      </div>
      <div
        class="right-project-item-batch-mask"
        v-if="batch"
        @click.stop="checkedToggle"
      >
        <img
          class="right-project-item-batch-img"
          src="https://image.xuexiwangzhe.com/FllNb5wd_Wf5RScGO2NyAaPqfoi_"
          v-if="!checkedControl"
        />
        <img
          class="right-project-item-batch-img"
          v-else
          src="https://image.xuexiwangzhe.com/FvFF_I4OTn8Ijcjz-xTkkqfkgXAO"
        />
      </div>
    </div>
    <mu-dialog
      :esc-press-close="false"
      :overlay-close="false"
      :open.sync="shareModal"
      dialog-class="project-custom-modal project-share-modal"
    >
      <div class="project-custom-modal-top modal-top">
        <div class="project-custom-modal-title">分享课程</div>
        <img
          class="project-custom-modal-close-img"
          src="https://image.xuexiwangzhe.com/Fnbsz2MJvhTRZ29k39oGf9_4Ao6c"
          @click="shareModal = false"
        />
      </div>
      <div class="set-role-box">
        <div class="set-role">设置角色：</div>
        <div class="role-item">
          <div class="role-radio-item">
            <mu-radio class="role-radio"></mu-radio>
            <div class="role-name">学员</div>
          </div>
          <div>完成打卡和作业、参与互动、查看排行和数据</div>
        </div>
        <div class="role-item">
          <div class="role-radio-item">
            <mu-radio class="role-radio"></mu-radio>
            <div class="role-name">领导</div>
          </div>
          <div>参与互动、点评/赞打卡和作业</div>
        </div>
        <div class="role-item">
          <div class="role-radio-item">
            <mu-radio class="role-radio"></mu-radio>
            <div class="role-name">讲师</div>
          </div>
          <div>参与互动、点评/赞打卡和作业</div>
        </div>
        <div class="role-item">
          <div class="role-radio-item">
            <mu-radio class="role-radio"></mu-radio>
            <div class="role-name">助教</div>
          </div>
          <div>协助管理主题/打卡/作业/成员、查看数据/报告</div>
        </div>
        <div class="role-item">
          <div class="role-radio-item">
            <mu-radio class="role-radio"></mu-radio>
            <div class="role-name">班主任</div>
          </div>
          <div>创建/删除项目、管理主题/打卡/作业/成员、查看数据/报告</div>
        </div>
      </div>
      <div class="share-box">
        <img
          class="share-img"
          src="https://image.xuexiwangzhe.com/FrfoN1safzMq9Ai-kNNatR1HS-f-"
        />
        <div class="share-content-box">
          <div class="share-title">微信扫码分享</div>
          <div class="share-tip">打开手机微信扫一扫，查看分享的课程</div>
        </div>
        <div class="share-copy">复制链接</div>
      </div>
    </mu-dialog>
    <mu-dialog
      :esc-press-close="false"
      :overlay-close="false"
      :open.sync="editModal"
      width="492"
      dialog-class="project-custom-modal project-edit-modal"
    >
      <div class="project-custom-modal-top">
        <div class="project-custom-modal-title">重命名</div>
        <img
          class="project-custom-modal-close-img"
          src="https://image.xuexiwangzhe.com/Fnbsz2MJvhTRZ29k39oGf9_4Ao6c"
          @click="editModal = false"
        />
      </div>
      <mu-text-field class="mu-input" v-model="renameText"></mu-text-field>
      <div class="project-custom-modal-btn-box">
        <mu-button
          class="project-custom-modal-btn-cancel"
          @click="editModal = false"
          >取消</mu-button
        >
        <mu-button
          class="project-custom-modal-btn-confirm"
          @click="renameProject"
          >确定</mu-button
        >
      </div>
    </mu-dialog>
    <mu-dialog
      :esc-press-close="false"
      :overlay-close="false"
      :open.sync="deleteModal"
      width="492"
      dialog-class="project-custom-modal project-delete-modal"
    >
      <div class="project-custom-modal-top">
        <div class="project-custom-modal-title">确认删除</div>
        <img
          class="project-custom-modal-close-img"
          src="https://image.xuexiwangzhe.com/Fnbsz2MJvhTRZ29k39oGf9_4Ao6c"
          @click="deleteModal = false"
        />
      </div>
      <div class="content">
        <div>
          确认删除<span class="content-name">“{{ data.title }}”</span>吗？
        </div>
        <div>删除后，将在回收站中保留30天，之后将永久删除。</div>
      </div>
      <div class="project-custom-modal-btn-box">
        <mu-button
          class="project-custom-modal-btn-cancel"
          @click="deleteModal = false"
          >取消</mu-button
        >
        <mu-button
          class="project-custom-modal-btn-confirm confirm-btn"
          @click="deleteProject"
          >确认删除
        </mu-button>
      </div>
    </mu-dialog>

    <mu-dialog
      :esc-press-close="false"
      :overlay-close="false"
      :open.sync="deleteLongModal"
      width="492"
      dialog-class="project-custom-modal project-delete-modal"
    >
      <div class="project-custom-modal-top">
        <div class="project-custom-modal-title">确认永久删除</div>
        <img
          class="project-custom-modal-close-img"
          src="https://image.xuexiwangzhe.com/Fnbsz2MJvhTRZ29k39oGf9_4Ao6c"
          @click="deleteLongModal = false"
        />
      </div>
      <div class="content">
        <div>
          确认永久删除<span class="content-name">“{{ data.title }}”</span>吗？
        </div>
        <div>删除后无法找回。</div>
      </div>
      <div class="project-custom-modal-btn-box">
        <mu-button
          class="project-custom-modal-btn-cancel"
          @click="deleteLongModal = false"
          >取消</mu-button
        >
        <mu-button
          @click="permanentlyDelete"
          class="project-custom-modal-btn-confirm confirm-btn"
          >确认删除</mu-button
        >
      </div>
    </mu-dialog>
  </div>
</template>

<script>
import { formatDate } from "../../../../util/common.js";
import { mapState } from "vuex";
export default {
  props: {
    checked: Boolean, // 是否选中
    batch: Boolean, // 批量管理
    data: Object, // 数据
    index: Number, // 数组索引
    navActived: {
      // 是否选中的回收站
      type: String,
      default: "",
    },
  },
  data() {
    return {
      shareModal: false,
      editModal: false,
      deleteModal: false,
      deleteLongModal: false,
      projectMenu: false,
      renameText: "",
    };
  },
  inheritAttrs: false,
  computed: {
    checkedControl: {
      set(val) {
        this.$emit("update:checked", val);
      },
      get() {
        return this.checked;
      },
    },
    color() {
      return this.globalData.color;
    },
    ...mapState(["listOperateData", "listOperate"]),
  },
  watch: {
    listOperateData: {
      handler: function(newVal, oldVal) {
        if (this.data.id == newVal.id) {
          if (this.listOperate == "star-project") {
            this.data.isStar = newVal.isStar;
          } else if (this.listOperate == "color-project") {
            this.data.color = newVal.color;
          } else if (this.listOperate == "rename-project") {
            this.data.title = newVal.title;
          }
          this.$forceUpdate();
        }
      },
      deep: true,
    },
  },
  methods: {
    checkedToggle() {
      if (!this.checkedControl) {
        this.checkedControl = true;
      } else {
        this.checkedControl = false;
      }
    },
    closeProjectMenu() {
      this.projectMenu = false;
    },
    setStar() {
      this.$axios.post("/project/setStar", { id: this.data.id }).then((res) => {
        if (res.success) {
          this.$store.commit("setListOperate", "star-project");
          if (this.data.isStar == 0) {
            this.$set(this.data, "isStar", 1);
            this.$store.commit("setListOperateData", {
              id: this.data.id,
              isStar: 1,
            });
          } else {
            this.$set(this.data, "isStar", 0);
            this.$store.commit("setListOperateData", {
              id: this.data.id,
              isStar: 0,
            });
          }
          this.$message.success("修改成功")
          this.$forceUpdate();
        }
      });
    },
    formatDate(val) {
      return formatDate(val, ".");
    },
    // 修改主题色
    colorProject(index) {
      const _this = this;
      const url = "/project/modifyColor";
      _this.$axios
        .post(url, {
          id: this.data.id,
          color: _this.color[index],
        })
        .then((res) => {
          if (res.success) {
            this.data.color = _this.color[index];
            this.$forceUpdate();
            this.$store.commit("setListOperate", "color-project");
            this.$store.commit("setListOperateData", {
              id: this.data.id,
              color: _this.color[index],
            });
            this.$message.success("修改成功");
            _this.editModal = false;
            this.projectMenu = false;
          }
        });
    },
    // 重命名
    renameProject() {
      const _this = this;
      const url = "/project/rename";
      _this.$axios
        .post(url, {
          id: this.data.id,
          title: _this.renameText,
        })
        .then((res) => {
          if (res.success) {
            _this.editModal = false;
            this.data.title = _this.renameText;
            this.$store.commit("setListOperate", "rename-project");
            this.$store.commit("setListOperateData", {
              id: this.data.id,
              title: _this.renameText,
            });
            this.$message.success("修改成功");
          }
        });
    },
    // 删除课程
    deleteProject() {
      const _this = this;
      const url = "/project/delete";
      _this.$axios
        .post(url, {
          id: this.data.id,
        })
        .then((res) => {
          if (res.success) {
            _this.deleteModal = false;
            this.$emit("delete-project", this.index);
            this.$store.commit("setListOperate", "delete-project");
            this.$store.commit("setListOperateData", { id: this.data.id });
            this.$message.success("删除成功");
          }
        });
    },
    // 复制
    copyProject() {
      const _this = this;
      const url = "/project/copy";
      _this.$axios
        .post(url, {
          id: this.data.id,
        })
        .then((res) => {
          if (res.success) {
            this.$message.success("复制成功");
            this.projectMenu = false;
            let copyData = JSON.parse(JSON.stringify(this.data));
            copyData.id = res.data.id;
            copyData.title += " 副本";
            this.$emit("copy-project", copyData);
          }
        });
    },
    // 还原
    restore() {
      this.$axios
        .post("/recycle/restore", {
          id: this.data.id,
          type: 2,
        })
        .then((res) => {
          if (res.success) {
            this.projectMenu = false;
            this.$message.success("还原成功");
            this.$emit("restore-project", this.index);
          }
        });
    },
    // 永久删除
    permanentlyDelete() {
      this.$axios
        .post("/recycle/permanentlyDelete", {
          id: this.data.id,
          type: 2,
        })
        .then((res) => {
          if (res.success) {
            this.deleteLongModal = false;
            this.$message.success("删除成功");
            this.$emit("permanentlydelete-project", this.index);
          }
        });
    },
    // 课程跳转
    redirectProjct() {
      if(this.projectMenu || this.navActived === 'recycle') return;
      // location.href = "newProjectInfo.html";
      window.open(location.origin + '/newProjectInfo.html?projectId=' + this.data.id)
      
    }
  },
};
</script>

<style lang="less">
.project-custom-modal {
  border-radius: 18px !important;
  padding: 30px !important;

  .mu-dialog-body {
    padding: 0;
  }
}

.project-custom-modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.project-custom-modal-title {
  font-size: 20px;
  color: #333;
  font-weight: bold;
}

.project-custom-modal-close-img {
  width: 14px;
  cursor: pointer;
}

.project-custom-modal-btn-box {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.project-custom-modal-btn-cancel {
  border-radius: 15px !important;
  border: 1px solid #666666 !important;
  width: 120px !important;
  height: 30px !important;
  box-shadow: none !important;
  font-size: 12px !important;
  color: #666 !important;
  font-weight: bold;
  margin-right: 21px !important;
}

.project-custom-modal-btn-confirm {
  width: 120px !important;
  height: 30px !important;
  background: #265cff !important;
  color: #fff !important;
  font-weight: bold;
  border-radius: 17px !important;
  box-shadow: none !important;
  font-size: 12px !important;
}

.project-edit-modal {
  .mu-input {
    width: 100%;
    margin-bottom: 65px;
  }
}

.project-delete-modal {
  .content {
    color: #333;
    font-size: 15px;
    margin-bottom: 50px;
    text-align: left;
  }

  .content-name {
    font-weight: bold;
  }

  .confirm-btn {
    background-color: #ff7632 !important;
  }
}

.project-share-modal {
  .modal-top {
    margin-bottom: 29px;
  }

  .set-role-box {
    margin-bottom: 39px;
  }

  .set-role {
    font-size: 12px;
    color: #333;
    font-weight: bold;
    margin-bottom: 14px;
  }

  .role-radio {
    margin-right: 15px;
  }

  .role-name {
    font-size: 12px;
    color: #333;
    font-weight: bold;
  }

  .role-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    color: #999;
    font-size: 12px;
    &:last-child {
      margin-bottom: 0;
    }
  }

  .role-radio-item {
    display: flex;
    align-items: center;
  }

  .share-box {
    display: flex;
    align-items: center;
  }

  .share-img {
    width: 150px;
    margin-right: 24px;
  }

  .share-content-box {
    padding: 28px 23px 28px 0;
    border-right: 1px solid #e6e6e6;
    margin-right: 22px;
  }

  .share-title {
    font-size: 12px;
    color: #333;
    font-weight: bold;
    margin-bottom: 3px;
  }

  .share-tip {
    font-size: 11px;
    color: #999;
  }

  .share-copy {
    font-size: 15px;
    color: #265cff;
    font-weight: bold;
    cursor: pointer;
  }
}

.right-project-item {
  position: relative;
  width: 263px;
  box-sizing: border-box;
  height: 129px;
  flex-shrink: 0;
  margin-right: 26px;
  margin-bottom: 25px;
  padding: 17px 16px 20px 30px;
  background: #ffffff;
  border-radius: 11px;
}

.right-project-item-box:nth-child(3n + 3) {
  .right-project-item {
    margin-right: 0;
  }
}

@media screen and (min-width: 1420px) {
  .right-project-item-box:nth-child(3n + 3) {
    .right-project-item {
      margin-right: 26px;
    }
  }
  .right-project-item-box:nth-child(4n + 4) {
    .right-project-item {
      margin-right: 0;
    }
  }
}

@media screen and (min-width: 1920px) {
  .right-project-item-box:nth-child(4n + 4) {
    .right-project-item {
      margin-right: 26px;
    }
  }

  .right-project-item-box:nth-child(5n + 5) {
    .right-project-item {
      margin-right: 0;
    }
  }
}

.right-project-item-batch-mask {
  cursor: pointer;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(51, 51, 51, 0.5);
  border-radius: 11px;
}

.right-project-item-batch-img {
  width: 30px;
}

.right-project-item-sign {
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 100%;
  background: #fdad3f;
  border-radius: 11px 0px 0px 11px;
}

.right-project-item-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 19px;
}

.right-project-item-operate {
  display: flex;
  align-items: flex-start;
}

.right-project-item-operate-img {
  &:last-child {
    margin-right: 0;
  }
  width: 18px;
  margin-right: 9px;
  cursor: pointer;
}

.right-project-item-title {
  font-size: 16px;
  color: #333;
  font-weight: bold;
  margin-bottom: 5px;
}

.right-project-item-share-img {
  width: 18px;
  height: 18px;
}

.right-project-item-menu-box {
  position: relative;

  .right-project-item-operate-img {
    margin-right: 0;
  }
}

.right-project-item-menu-modal {
  position: absolute;
  z-index: 10;
  top: 24px;
  left: -23px;
  font-size: 11px;
  background: #ffffff;
  box-shadow: 0px 2px 6px 0px rgba(102, 102, 102, 0.2);
  border-radius: 3px;
}

.right-project-item-menu-modal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 15px;
  padding-right: 5px;
  padding-top: 6px;
  padding-bottom: 6px;
  width: 116px;
  box-sizing: border-box;
  margin-bottom: 6px;
  color: #666;
  position: relative;
  cursor: pointer;

  .right-project-color-select-box {
    position: absolute;
    right: -101px;
    top: 0;
    display: none;
    .right-project-color-select {
      margin-left: 3px;
      width: 98px;
      height: 51px;
      background: #ffffff;
      box-shadow: 0px 2px 6px 0px rgba(102, 102, 102, 0.2);
      border-radius: 3px;
      padding: 4px 3px;
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
    }
    .right-project-color-select-option {
      width: 18px;
      height: 18px;
      border-radius: 50%;
      margin: 2px;
      text-align: center;
      .color-active {
        width: 16px;
        height: 16px;
        margin-top: 2px;
      }
    }
  }

  .right-project-item-menu-modal-item-left-img {
    width: 12px;
    margin-right: 9px;
  }

  .right-project-item-menu-modal-item-left-img-actived {
    width: 12px;
    margin-right: 9px;
    display: none;
  }

  .right-project-item-menu-modal-item-right-img {
    width: 12px;
  }

  .right-project-item-menu-modal-item-right-img-actived {
    width: 12px;
    display: none;
  }

  &:last-child {
    margin-bottom: 0;
  }
  &:hover {
    background-color: #999999;
    color: #fff;

    &.switch-color {
      .right-project-color-select-box {
        display: block;
      }
    }

    .right-project-item-menu-modal-item-right-img {
      display: none;
    }

    .right-project-item-menu-modal-item-right-img-actived {
      display: block;
    }

    .right-project-item-menu-modal-item-left-img {
      display: none;
    }

    .right-project-item-menu-modal-item-left-img-actived {
      display: block;
    }
  }
}

.right-project-item-menu-modal-item-left {
  display: flex;
  align-items: center;
}

.right-project-item-time {
  color: #999999;
  font-size: 12px;
}

.right-project-item-bottom {
  display: flex;
  justify-content: space-between;
}

.right-project-item-bottom-left {
  display: flex;
  align-items: center;
}

.right-project-item-tag {
  width: 48px;
  height: 24px;
  text-align: center;
  line-height: 24px;
  background: #f2f4f8;
  border-radius: 12px;
  color: #333;
  font-size: 12px;
  margin-right: 8px;
}

.right-project-item-count {
  color: #333;
  font-size: 12px;
}

.right-project-item-count-number {
  font-weight: bold;
  margin-right: 2px;
}

.right-project-item-collect-img {
  width: 18px;
  height: 18px;
  cursor: pointer;
}
</style>
